<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    *{
        margin: 0;
        padding: 0;
    }
    #tip {
        width: 100px;
        height: 50px;
        border-radius: 25px;
        line-height: 50px;
        margin:200px auto;
        text-align: center;
        opacity: 0.5;
        background-color: red;
        display: none;
    }
</style>
<script>
    window.onload=function(){
        var btn =document.getElementById("btn");
        var tip=document.getElementById("tip");
        btn.onclick=function(){
            tip.style.display="block";
            
            setTimeout(function(){
                tip.style.display="none";
            },1500)
        }
    }
</script>
<body>
<input type="button" id="btn" value="删除"/>
<div id="tip">删除成功</div>

</body>
</html>